package com.aaa.hospital.Client.controller;

import com.aaa.hospital.Client.pojo.Visitingcard;
import com.aaa.hospital.Client.service.RegistrationService;
import com.aaa.hospital.ManagementEnd.pojo.User;
import com.aaa.hospital.ManagementEnd.service.UserServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.websocket.server.PathParam;

@Controller
public class RegistrationsController {
    @Autowired
    private UserServices userServices;
    @Autowired
    private RegistrationService registrationService;
    @RequestMapping("/queryVisid")
    @ResponseBody
    public Boolean queryVisid(@PathParam("uname") String uname, @PathParam("idcard") String idcard){
        Visitingcard visid = userServices.queryByIdCard(uname,idcard);
        if(visid!=null){
            return true;
        }else {
            return false;
        }
    }
}
